const express = require("express");
const history = require("connect-history-api-fallback");

const app = express();
app.use(history());
app.use(express.static(__dirname + "/public"));

app.get("/person", (req, res) => {
  res.send({
    name: "tom",
    age: 18,
  });
});

app.listen(5005, (err) => {
  if (err) {
    console.log(err);
  } else {
    console.log("server is running on port 5005");
  }
});
